package com.shangma.exercise;

/**
 * @classname:forxunhuan
 * @description:
 * @author: Mr.Z
 * @date: 2020/11/25 19:58
 * @version: 0.1
 * @since:1.8
 */
public class lingxing {
    public static void main(String[] args) {
        int n = 5;
        for (int i = 1; i <= n; i++) {
            for (int j = 1;j<=n-i;j++){
                System.out.print(" ");
            }
            for(int k = 1;k<=2*i-1;k++){
                System.out.print("*");
            }
            System.out.println();
        }
        for(int i = 1;i<n;i++){
            for(int j = 1;j<=i;j++){
                System.out.print(" ");
            }
            for(int k = 1;k<=2*(n-i)-1;k++){
                System.out.print("*");
            }
            System.out.println();
        }

    }
}
